while True:
    input = raw_input()
    if input == "42":
        break
    print input